<include file="public@head"/>
</head>

<body>
<div class="layui-fluid wrap js-check-wrap" id="component-tabs">
    <div class="layui-row">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">数据管理</div>
                <div class="layui-card-body">
                    <div class="layui-tab">
                        <ul class="layui-tab-title">
                            <li class="layui-this"><a>所有数据</a></li>
                            <li>
                                <a href="{:url('theme/fileArrayDataEdit',['tab'=>$tab,'var'=>$var,'file_id'=>$file_id,'widget'=>$widget])}">添加数据</a>
                            </li>
                        </ul>
                        <div class="layui-tab-content">
                            <div class="layui-tab-item layui-show">
                                <form method="post" class="js-ajax-form layui-form">
                                    <table class="layui-table">
                                        <thead>
                                        <tr>
                                            <foreach name="array_item" item="vo">
                                                <th>{$vo.title}</th>
                                            </foreach>
                                            <th width="120">{:lang('ACTIONS')}</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <foreach name="array_items" item="item" key="itemKey">
                                            <tr>
                                                <foreach name="array_item" item="vo">
                                                    <td>{$item[$key]|default=''}</td>
                                                </foreach>
                                                <td>
                                                    <span class="layui-btn-group">
                                                        <a class="layui-btn layui-btn-xs" href="{:url('theme/fileArrayDataEdit',['tab'=>$tab,'var'=>$var,'file_id'=>$file_id,'widget'=>$widget,'item_index'=>$itemKey])}">编辑</a>
                                                        <a class="layui-btn layui-btn-xs layui-btn-danger js-ajax-delete" href="{:url('theme/fileArrayDataDelete',['tab'=>$tab,'var'=>$var,'file_id'=>$file_id,'widget'=>$widget,'item_index'=>$itemKey])}">删除</a>
                                                    </span>
                                                </td>
                                            </tr>
                                        </foreach>
                                        </tbody>
                                    </table>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<include file="public@footer"/>
<script>
    function confirm() {
        return true;
    }
</script>
</body>

</html>